package com.glorysoft.sunnypda.ui.reportrepair;

import android.view.View;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.glorysoft.sunnypda.R;

import java.util.List;

import androidx.annotation.Nullable;

public class UserListAdapter extends BaseQuickAdapter<String, BaseViewHolder> {

    public UserListAdapter(@Nullable List<String> data) {
        super(R.layout.item_user_list, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, String s) {
        helper.setText(R.id.tvUser,s);
        TextView tvUser = helper.getView(R.id.tvUser);
        tvUser.setOnClickListener(view ->{
            remove(helper.getAdapterPosition());
        });
    }
}
